import axios from './api' // 倒入 api
import config from './config.js' // 倒入默认配置
export const BASEURL = config.baseURL

/* 将所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 */

// 资料-口腔百科-获取列表
export const GET_BAIKE_SEARCH = (params) => {
    return axios({
        url: 'oralcavity/baike/search',
        method: 'GET',
        params,
    })
}
// 资料-口腔百科-新增口腔百科
export const ADD_BAIKE_INFO = (params) => {
    return axios({
        url: 'oralcavity/baike/add',
        method: 'POST',
        data: params,
    })
}

// 资料-口腔百科-编辑口腔百科
export const EDIT_BAIKE_INFO = (params) => {
    return axios({
        url: 'oralcavity/baike/edit',
        method: 'POST',
        data: params,
    })
}

// 资料-口腔百科-获取详情
export const GET_BAIKE_INFO = (params) => {
    return axios({
        url: 'oralcavity/baike/info',
        method: 'GET',
        params,
    })
}

// 资料-口腔百科-删除口腔百科
export const DELETE_BAIKE_INFO = (params) => {
    return axios({
        url: 'oralcavity/baike/delete',
        method: 'GET',
        params,
    })
}

// 资料-口腔案例-获取列表
export const GET_CASE_SEARCH = (params) => {
    return axios({
        url: 'oralcavity/case/search',
        method: 'GET',
        params,
    })
}

// 资料-口腔案例-新增口腔案例
export const ADD_CASE_INFO = (params) => {
    return axios({
        url: 'oralcavity/case/add',
        method: 'POST',
        data: params,
    })
}

// 资料-口腔案例-编辑口腔案例
export const EDIT_CASE_INFO = (params) => {
    return axios({
        url: 'oralcavity/case/edit',
        method: 'POST',
        data: params,
    })
}

// 资料-口腔案例-获取口腔案例详情
export const GET_CASE_INFO = (params) => {
    return axios({
        url: 'oralcavity/case/info',
        method: 'GET',
        params,
    })
}

// 资料-口腔案例-删除口腔案例
export const DELETE_CASE_INFO = (params) => {
    return axios({
        url: 'oralcavity/case/delete',
        method: 'GET',
        params,
    })
}

// 资料-文章资讯-获取列表
export const GET_ARTICLE_SEARCH = (params) => {
    return axios({
        url: 'article/search',
        method: 'GET',
        params,
    })
}

// 资料-文章资讯-删除文章资讯
export const DELETE_ARTICLE_INFO = (params) => {
    return axios({
        url: 'article/delete',
        method: 'GET',
        params,
    })
}

// 资料-文章资讯-新增文章资讯
export const ADD_ARTICLE_INFO = (params) => {
    return axios({
        url: 'article/add',
        method: 'POST',
        data: params,
    })
}

// 资料-文章资讯-编辑文章资讯
export const EDIT_ARTICLE_INFO = (params) => {
    return axios({
        url: 'article/edit',
        method: 'POST',
        data: params,
    })
}

// 资料-文章资讯-获取文章资讯详情
export const GET_ARTICLE_INFO = (params) => {
    return axios({
        url: 'article/info',
        method: 'GET',
        params,
    })
}

// 资料-社区问答-获取社区问答列表
export const GET_QUESTIONANSWER_SEARCH = (params) => {
    return axios({
        url: 'questionanswer/search',
        method: 'GET',
        params,
    })
}

// 资料-社区问答-删除社区问答
export const DELETE_QUESTIONANSWER_INFO = (params) => {
    return axios({
        url: 'questionanswer/delete',
        method: 'GET',
        params,
    })
}

// 资料-社区问答-新增社区问答
export const ADD_QUESTIONANSWER_INFO = (params) => {
    return axios({
        url: 'questionanswer/add',
        method: 'POST',
        data: params,
    })
}

// 资料-社区问答-编辑社区问答
export const EDIT_QUESTIONANSWER_INFO = (params) => {
    return axios({
        url: 'questionanswer/edit',
        method: 'POST',
        data: params,
    })
}

// 资料-社区问答-获取社区问答详情
export const GET_QUESTIONANSWER_INFO = (params) => {
    return axios({
        url: 'questionanswer/info',
        method: 'GET',
        params,
    })
}

// 资料-医院资质-获取医院资质列表
export const GET_QUALIFICATION_HOSPITAL_SEARCH = (params) => {
    return axios({
        url: 'qualification/hospital/search',
        method: 'GET',
        params,
    })
}
// 资料-医院资质-删除医院资质
export const DELETE_QUALIFICATION_HOSPITAL_INFO = (params) => {
    return axios({
        url: 'qualification/hospital/delete',
        method: 'GET',
        params,
    })
}

// 资料-医院资质-新增医院资质
export const ADD_QUALIFICATION_HOSPITAL_INFO = (params) => {
    return axios({
        url: 'qualification/hospital/add',
        method: 'POST',
        data: params,
    })
}

// 资料-医院资质-编辑医院资质
export const EDIT_QUALIFICATION_HOSPITAL_INFO = (params) => {
    return axios({
        url: 'qualification/hospital/edit',
        method: 'POST',
        data: params,
    })
}

// 资料-医院资质-获取医院资质详情
export const GET_QUALIFICATION_HOSPITAL_INFO = (params) => {
    return axios({
        url: 'qualification/hospital/info',
        method: 'GET',
        params,
    })
}

// 资料-医院资质-获取医院资质下拉列表
export const GET_QUALIFICATION_HOSPITAL_OPTIONS = (params) => {
    return axios({
        url: 'qualification/hospital/options',
        method: 'GET',
        params,
    })
}

// 资料-医生资质-获取医生资质列表
export const GET_QUALIFICATION_DOCTOR_SEARCH = (params) => {
    return axios({
        url: 'qualification/doctor/search',
        method: 'GET',
        params,
    })
}
// 资料-医生资质-删除医生资质
export const DELETE_QUALIFICATION_DOCTOR_INFO = (params) => {
    return axios({
        url: 'qualification/doctor/delete',
        method: 'GET',
        params,
    })
}

// 资料-医生资质-新增医生资质
export const ADD_QUALIFICATION_DOCTOR_INFO = (params) => {
    return axios({
        url: 'qualification/doctor/add',
        method: 'POST',
        data: params,
    })
}

// 资料-医生资质-编辑医生资质
export const EDIT_QUALIFICATION_DOCTOR_INFO = (params) => {
    return axios({
        url: 'qualification/doctor/edit',
        method: 'POST',
        data: params,
    })
}

// 资料-医生资质-获取医生资质详情
export const GET_QUALIFICATION_DOCTOR_INFO = (params) => {
    return axios({
        url: 'qualification/doctor/info',
        method: 'GET',
        params,
    })
}

// 资料-医生资质-获取医生资质下拉列表
export const GET_QUALIFICATION_DOCTOR_OPTIONS = (params) => {
    return axios({
        url: 'qualification/doctor/options',
        method: 'GET',
        params,
    })
}

// 资料-材料资质-获取材料资质列表
export const GET_QUALIFICATION_MATERIAL_SEARCH = (params) => {
    return axios({
        url: 'qualification/material/search',
        method: 'GET',
        params,
    })
}
// 资料-材料资质-删除材料资质
export const DELETE_QUALIFICATION_MATERIAL_INFO = (params) => {
    return axios({
        url: 'qualification/material/delete',
        method: 'GET',
        params,
    })
}

// 资料-材料资质-新增材料资质
export const ADD_QUALIFICATION_MATERIAL_INFO = (params) => {
    return axios({
        url: 'qualification/material/add',
        method: 'POST',
        data: params,
    })
}

// 资料-材料资质-编辑材料资质
export const EDIT_QUALIFICATION_MATERIAL_INFO = (params) => {
    return axios({
        url: 'qualification/material/edit',
        method: 'POST',
        data: params,
    })
}

// 资料-材料资质-获取材料资质详情
export const GET_QUALIFICATION_MATERIAL_INFO = (params) => {
    return axios({
        url: 'qualification/material/info',
        method: 'GET',
        params,
    })
}

// 资料-材料资质-材料资质下拉列表
export const GET_QUALIFICATION_MATERIAL_OPTIONS = (params) => {
    return axios({
        url: 'qualification/material/options',
        method: 'GET',
        params,
    })
}

// 资料-材料资质-新增产品型号
export const ADD_PRODUCT_MODELINFO = (params) => {
    return axios({
        url: 'material/productmodel/add',
        method: 'POST',
        data: params,
    })
}

// 资料-材料资质-删除产品型号
export const DELETE_PRODUCT_MODELINFO = (params) => {
    return axios({
        url: 'material/productmodel/delete',
        method: 'GET',
        params,
    })
}

// 资料-医院资质、医生资质、材料资质-新增热门关键词
export const ADD_HOT_KEYWORDS = (params) => {
    return axios({
        url: 'keywords/add',
        method: 'POST',
        data: params,
    })
}

// 资料-医院资质、医生资质、材料资质-删除热门关键词
export const DELETE_HOT_KEYWORDS = (params) => {
    return axios({
        url: 'keywords/delete',
        method: 'GET',
        params,
    })
}

// 资料-医院资质、医生资质、材料资质-热门关键词下拉列表
export const GET_HOT_KEYWORDS_OPTIONS = (params) => {
    return axios({
        url: 'keywords/options',
        method: 'GET',
        params,
    })
}